package com.gz.furnitures.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * order表示订单
 */
//-- 创建订单表
//use home_furniture
//create TABLE `order`(
//`id` VARCHAR(64) PRIMARY KEY, #订单号
//create_time datetime not NULL, #订单生成时间
//`price` DECIMAL(11,2) NOT NULL,#订单金额
//`status` TINYINT NOT NULL,#状态 0 未发货 ，1表示已发货，2表示已结账
//`member_id` INT not NULL#会员id
//#考虑是否需要外键，不需要，外键对效率有影响，应当从程序的业务保证一致性
//)CHARSET utf8;
public class Order {
    private String id;
    private LocalDateTime createTime;
    private BigDecimal price;
    private Integer status;
    private Integer memeberId;

    //无参构造器！
    public Order() {}

    @Override
    public String toString() {
        return "Order{" +
                "id='" + id + '\'' +
                ", createTime=" + createTime +
                ", price=" + price +
                ", status=" + status +
                ", memeberId=" + memeberId +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getMemeberId() {
        return memeberId;
    }

    public void setMemeberId(Integer memeberId) {
        this.memeberId = memeberId;
    }

    public Order(String id, LocalDateTime createTime, BigDecimal price, Integer status, Integer memeberId) {
        this.id = id;
        this.createTime = createTime;
        this.price = price;
        this.status = status;
        this.memeberId = memeberId;
    }
}
